date <- c("20251001","20251002","20251003","20251004","20251005","20251006","20251007","20251008","20251009","20251010","20251011","20251012","20251013","20251014","20251015","20251016","20251017","20251018","20251019","20251020","20251021","20251022","20251023","20251024","20251025","20251026","20251027","20251028","20251029","20251030","20251031")
sleep <- c(82,-206,-125,-77,10,-152,-111,-421,-108,-43,-160,178,222,-199,48,40,342,-17,82,-131,34,-4,130,271,-140,-121,14,-89,107,82,-23)
wake <- c(506,412,458,574,428,606,466,379,667,502,634,624,594,566,513,563,646,668,574,599,640,674,848,616,239,543,599,666,620,650,604)
sleeplong <- c(424,618,583,651,418,758,577,800,775,545,794,446,372,765,465,523,304,685,492,730,606,678,718,345,379,664,585,755,513,568,627)
plot(c(1:31),sleep,type="s",col="red",xaxt="n",xlab = "date",ylab="time(minute)",ylim=range(-1000,2200))
lines(c(1:31),wake,type="s",col="blue")
lines(c(1:31),sleeplong,type="s",col="green")
legend("topleft",inset=.05,title="睡眠曲线",c("睡(辅助线:凌晨)","醒","时长(辅助线:480)"),lty=c(1,1,1),col=c("red","blue","green"))
abline(h = 0,col="red",lty = 3)
abline(h = 1440,col="red",lty = 3)
abline(h = 480,col="green",lty = 3)
axis(1, c(1:31),date)
